Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Remove the native list attribute self.layers in HRFormer FFN modules #2449

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

Ben-Louis
Copy link
Collaborator

Motivation

As illustrated in #2448, applying revert_sync_batchnorm on HRFormer does not convert the BNs within the self.layers list in the FFN modules. Consequently, this triggers a RuntimeError during the inference process.

Modification

  1. remove the attribute layers in FFN module
  2. rewrite the forward process

BC-breaking (Optional)

Use cases (Optional)

Checklist

Before PR:

  • I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit tests to ensure correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

  • CLA has been signed and all committers have signed the CLA in this PR.

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.02 ⚠️

Comparison is base (d1621e9) 80.62% compared to head (f2a0ab8) 80.60%.

❗ Current head f2a0ab8 differs from pull request most recent head 1d6e621. Consider uploading reports for the commit 1d6e621 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           dev-1.x    #2449      +/-   ##
===========================================
- Coverage    80.62%   80.60%   -0.02%     
===========================================
  Files          250      250              
  Lines        15087    15087              
  Branches      2615     2614       -1     
===========================================
- Hits         12164    12161       -3     
- Misses        2262     2267       +5     
+ Partials       661      659       -2     
Flag Coverage Δ
unittests 80.60% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmpose/models/backbones/hrformer.py 93.72% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Tau-J Tau-J merged commit 442df64 into open-mmlab:dev-1.x Jun 12, 2023
@Ben-Louis Ben-Louis deleted the fix-hrformer branch July 10, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants